﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:System="clr-namespace:System;assembly=mscorlib" 
    x:Class="Mad.Nug.MainPage"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">
	<phone:PhoneApplicationPage.Resources>
		<LinearGradientBrush x:Key="madnugColor" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF13FF00" Offset="1"/>
			<GradientStop Color="#FF12F900"/>
			<GradientStop Color="#FFFCA200" Offset="0.519"/>
		</LinearGradientBrush>
		<Storyboard x:Name="StartAnimation">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="lstContent">
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="progressBar">
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="image">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Thickness>0</Thickness>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.4">
					<DiscreteObjectKeyFrame.Value>
						<Thickness>0</Thickness>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="image">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<HorizontalAlignment>Center</HorizontalAlignment>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="image">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<VerticalAlignment>Top</VerticalAlignment>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RowSpan)" Storyboard.TargetName="image">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<System:Int32>2</System:Int32>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0" Value="318">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)" Storyboard.TargetName="lstContent">
				<EasingColorKeyFrame KeyTime="0" Value="White"/>
				<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#3DFFFFFF"/>
				<EasingColorKeyFrame KeyTime="0:0:0.5" Value="White"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
    </phone:PhoneApplicationPage.Resources>

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

    <Grid Background="White">
        <Grid.RowDefinitions>
        	<RowDefinition Height="75"/>
        	<RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Image x:Name="image" Source="Themes/Images/Header.jpg" RenderTransformOrigin="0.5,0.5">
        	<Image.RenderTransform>
        		<CompositeTransform TranslateY="318"/>
        	</Image.RenderTransform>
        </Image>
        <ListBox x:Name="lstContent" Margin="10,15,10,10" Grid.Row="1" ItemsSource="{Binding Items}"
                 ItemTemplate="{StaticResource plantilla}" Foreground="White" SelectedItem="{Binding SelectedItem, Mode=TwoWay}"/>
        <ProgressBar x:Name="progressBar" Margin="0,5,0,0" Grid.Row="1" VerticalAlignment="Top" IsIndeterminate="True"
                     Visibility="{Binding ProgressLoad}">
        	<ProgressBar.Foreground>
        		<LinearGradientBrush EndPoint="0.967,0.277" StartPoint="0.03,0.008">
        			<GradientStop Color="#FF13FF00" Offset="1"/>
        			<GradientStop Color="#FF12F900"/>
        			<GradientStop Color="#FFFCA200" Offset="0.519"/>
        		</LinearGradientBrush>
        	</ProgressBar.Foreground>
        </ProgressBar>
    </Grid>
</phone:PhoneApplicationPage>